package com.nbsaas.boot.tenant.rest.convert;

import com.nbsaas.boot.tenant.data.entity.Database;
import com.nbsaas.boot.tenant.api.domain.request.DatabaseRequest;

import org.springframework.beans.BeanUtils;
import com.nbsaas.boot.rest.api.Converter;
import com.nbsaas.boot.utils.BeanDataUtils;

/**
* 数据源管理请求对象转换成实体对象
*/

public class DatabaseEntityConvert  implements Converter<Database, DatabaseRequest> {

    @Override
    public Database convert(DatabaseRequest source) {
        Database result = new Database();
        BeanDataUtils.copyProperties(source, result);
        return result;
    }
}

